package com.module.main.test;

import android.content.Context;
import android.content.Intent;
import android.view.View;

import com.orhanobut.logger.Logger;
import com.module.bean.beans.LoginBean;
import com.module.main.R;

import javax.inject.Inject;

import ren.nearby.http.base.BaseActivity;


/**
 * 测试告别dagger2模板
 * Created by Administrator on 2018/5/2 0002.
 */


public class TemplateDaggerAct extends BaseActivity implements TemplateDaggerActContract.View{

    @Inject
    LoginBean loginBean;


    @Override
    public int getContentView() {
        return R.layout.main_dagger2_template;
    }

    @Override
    public void onIntent() {

        templateDaggerActAction.takeView(this);
    }

    @Override
    public Context getContext() {
        return this;
    }

    @Override
    public void setPresenter(TemplateDaggerActAction presenter) {

    }

    public void template1(View view) {
        startActivity(new Intent(TemplateDaggerAct.this, TemplateDaggerAct2.class));
        finish();
    }

    @Override
    protected void onResume() {
        super.onResume();

    }

    @Override
    public void initView() {
        Logger.e(loginBean == null ?
                "value = 1" :
                " value = 0" + loginBean.getUsername() + " - " + loginBean.isIps());

        Logger.e(templateDaggerActAction == null ?
                "templateDaggerActAction value = 1" :
                "templateDaggerActAction value = 0" );
        if(templateDaggerActAction!=null){
            templateDaggerActAction.dowApk();
        }

    }
    @Inject
    TemplateDaggerActContract.Action templateDaggerActAction;
}
